<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <h1>th:if - th:unless -> 参数i=1显示if内容</h1>
    <p th:if="${i} == 1">显示i = 1内容</p>
    <p th:unless="${i} == 1">显示i != 1内容</p>

    <h1>th:switch -> 参数key=n显示case内容</h1>
    <div th:switch="${key}">
      <div>default</div>
      <div th:case="1">case 1</div>
      <div th:case="2">case 2</div>
      <div th:case="3">case 3</div>
      <div th:case="*">not match</div>
    </div>
</body>
</html>